package com.authine.cloudpivot.ext.dto.model.settle;

import com.authine.cloudpivot.ext.dto.Summary;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SettleDetail implements Serializable {

    private static final long serialVersionUID = 5212029964645304648L;

    @Schema(description = "ID")
    private String id;
    /**
     * 关联ID(退款对应的收款明细ID)
     */
    @Schema(description = "关联ID(退款对应的收款明细ID)")
    private String reference_id;
    /**
     * 结算单Id
     */
    @Schema(description = "结算单Id")
    private String settle_id;
    /**
     * 交易ID
     */
    @Schema(description = "交易ID")
    private String trade_id;
    /**
     * 账单Id
     */
    @Schema(description = "账单Id")
    private String bill_id;
    /**
     * 发票单ID
     */
    @Schema(description = "发票单ID")
    private String invoice_apply_id;
    /**
     * 发票明细核销账单ID
     */
    @Schema(description = "发票明细核销账单ID")
    private String invoice_detail_bill_id;
    /**
     * 名称
     */
    @Schema(description = "名称")
    private String name;
    /**
     * 型号/税率
     */
    @Schema(description = "型号/税率")
    private String model_spec;
    /**
     * 总计（包含平台费）
     */
    @Schema(description = "总计（包含平台费）")
    private BigDecimal total;
    /**
     * 平台费
     */
    @Schema(description = "平台费")
    private BigDecimal platform;
    /**
     * 金融费
     */
    @Schema(description = "金融费")
    private BigDecimal interest;
    /**
     * 其它费用
     */
    @Schema(description = "其它费用")
    private BigDecimal other;
    /**
     * 平台费
     */
    @Schema(description = "平台费费率")
    private BigDecimal platform_rate;
    /**
     * 金融费
     */
    @Schema(description = "金融费费率")
    private BigDecimal interest_rate;
    /**
     * 扩展字段（记录的是订单信息，信息取自账单）
     */
    @Schema(description = "扩展字段")
    private String extends_attr;

    /**
     * 结算单核销序号(同一个结算申请单id对应的writeOffId是递增的)
     */
    @Schema(description = "结算单核销序号")
    private String write_off_id;

    /**
     * 是否发票全部红冲时生成
     */
    @Schema(description = "是否发票全部红冲时生成")
    private Boolean invoice_offset_all;

}
